<html>

<head>
    <meta charset="utf-8">
    <title>会员卡</title>
    {php include $this->template($this->cur_tpl.'/_common_meta');}
    <link rel="stylesheet" type="text/css" href="{RES}mobile/{php echo $this->cur_tpl}/css/main.css?v=4" media="all">
    <link rel="stylesheet" type="text/css" href="{RES}mobile/{php echo $this->cur_tpl}/css/dialog.css" media="all">
    <script type="text/javascript" src="{RES}mobile/{php echo $this->cur_tpl}/js/jquery_min.js"></script>
    <script type="text/javascript" src="{RES}mobile/{php echo $this->cur_tpl}/js/main.js"></script>
    <script type="text/javascript" src="{RES}mobile/{php echo $this->cur_tpl}/js/dialog_min.js"></script>
    <script type="text/javascript" src="{RES}mobile/{php echo $this->cur_tpl}/js/mymain.js"></script>
</head>

<script type="text/javascript">
          var payAmount="{$payAmount}";
         // if(parseInt(payAmount)>0){
        if((payAmount)>0){
        	  callpay();
          }
            	
           
            //调用微信JS api 支付
            function jsApiCall()
            {
                WeixinJSBridge.invoke(
                    'getBrandWCPayRequest',
                    <?php echo $jsApiParameters; ?>,
                    function(res){
                        WeixinJSBridge.log(res.err_msg);
                       // alert(res.err_code+res.err_desc+res.err_msg);
                        var dostring = res.err_msg;
        				var temparr = dostring.split(':');
        				if(temparr.length == 2){
        				  // Tmsg(temparr[1]);
        				   if(temparr[1] == 'ok'){
        				     // window.location.reload(); 
        				     var url="{php echo $this->createMobileUrl('index')}";
        				     window.location.href=url;
        				   }
        				}else{
        				   Tmsg(res.err_msg);
        				}
                       
                    }
                );
            }
            function callpay()
            {
                if (typeof WeixinJSBridge == "undefined"){
                    if( document.addEventListener ){
                        document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
                    }else if (document.attachEvent){
                        document.attachEvent('WeixinJSBridgeReady', jsApiCall);
                        document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
                    }
                }else{
                    jsApiCall();
                }
            }
        </script>

<body onselectstart="return true;" ondragstart="return false;" class="bc-bg">


    <div class="money_navs" id="js_redpacket_list">


 {loop $cardstyle_array $item}
 
        <a href="{php echo $this->createMobileUrl('Rech', array('money' => $item), true)}" class="money_nav tj_item"  data-price="{$item}">
            <span class="money_wrp">
                <span class="money_num">{$item}</span>元
            </span>
        </a>
   {/loop}     
    </div>

    <div class="bc-money-info">
        <i>赠</i>
        充值送积分：满<span>500</span>元送<span class="imp">500</span>积分
    </div>

    <script type="text/javascript">
        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
            WeixinJSBridge.call('hideToolbar');
        });
    </script>

</body>

</html>